package TestDemo2;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Administrator
 * Date: 2024-03-13
 * Time: 16:36
 */
class Base2{
    public int a = 10;
    public int b = 20;
}

class Derived2 extends Base{
    public int a = 50;
    public int b = 40;
    public int c = 30;
}
public class Test2 {
    public static void main(String[] args) {
        Derived2 derised2 = new Derived2();
        Base2 base2 = new Base2();
        System.out.println(derised2.a);
        System.out.println(derised2.b);
        System.out.println(derised2.c);
        System.out.println("==================");
        System.out.println(base2.a);
        System.out.println(base2.b);
    }
}
